package com.yidu.manage.controller.user;

import com.github.pagehelper.PageHelper;
import com.yidu.common.domain.user.UserInfo;
import com.yidu.common.utils.ResultUtil;
import com.yidu.manage.service.ITUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController
{
    @Autowired
    private ITUserInfoService userInfoService;

    @GetMapping()
    @PreAuthorize("@ss.hasPermit('manage:user:list')")
    public Object list(UserInfo userInfo)
    {
        return ResultUtil.success(userInfoService.list(userInfo));
    }
}
